﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using SqlSugar;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Dilon.Core
{
    /// <summary>
    /// 操作日志表
    /// </summary>
    [SugarTable("sys_log_op", TableDescription = "操作日志表")]
    public class SysLogOp : AutoIncrementEntity
    {
        /// <summary>
        /// 名称
        /// </summary>
        [SugarColumn(ColumnDescription="名称", IsNullable = true)]
        public string Name { get; set; }


        /// <summary>
        /// 是否执行成功（Y-是，N-否）
        /// </summary>
        [SugarColumn(ColumnDescription="是否执行成功", IsNullable = true)]
        public string Success { get; set; }

        /// <summary>
        /// 具体消息
        /// </summary>
        [SugarColumn(ColumnDescription="具体消息", IsNullable = true)]
        public string Message { get; set; }

        /// <summary>
        /// IP
        /// </summary>
        [SugarColumn(ColumnDescription="IP", IsNullable = true)]
        public string Ip { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        [SugarColumn(ColumnDescription="地址", IsNullable = true)]
        public string Location { get; set; }

        /// <summary>
        /// 浏览器
        /// </summary>
        [SugarColumn(ColumnDescription="浏览器", IsNullable = true)]
        public string Browser { get; set; }

        /// <summary>
        /// 操作系统
        /// </summary>
        [SugarColumn(ColumnDescription="操作系统", IsNullable = true)]
        public string Os { get; set; }

        /// <summary>
        /// 请求地址
        /// </summary>
        [SugarColumn(ColumnDescription="请求地址", IsNullable = true)]
        public string Url { get; set; }

        /// <summary>
        /// 类名称
        /// </summary>
        [SugarColumn(ColumnDescription="类名称", IsNullable = true)]
        public string ClassName { get; set; }

        /// <summary>
        /// 方法名称
        /// </summary>
        [SugarColumn(ColumnDescription="方法名称", IsNullable = true)]
        public string MethodName { get; set; }

        /// <summary>
        /// 请求方式（GET POST PUT DELETE)
        /// </summary>
        [SugarColumn(ColumnDescription="请求方式", IsNullable = true)]
        public string ReqMethod { get; set; }

        /// <summary>
        /// 请求参数
        /// </summary>
        [SugarColumn(ColumnDescription="请求参数", IsNullable = true)]
        public string Param { get; set; }

        /// <summary>
        /// 返回结果
        /// </summary>
        [SugarColumn(ColumnDescription="返回结果", IsNullable = true)]
        public string Result { get; set; }

        /// <summary>
        /// 耗时（毫秒）
        /// </summary>
        [SugarColumn(ColumnDescription="耗时", IsNullable = true)]
        public long ElapsedTime { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        [SugarColumn(ColumnDescription="操作时间", IsNullable = true)]
        public DateTimeOffset OpTime { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        [SugarColumn(ColumnDescription="操作人",IsNullable =true)]
        public string Account { get; set; }

    }
}
